//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.wsd.smartcarwasher.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.wsd.smartcarwasher.constans.MachineEvent;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;

@ApiModel("机器事件消息记录")
public class MessageRecord {
    @ApiModelProperty("主键id")
    private int id;
    @ApiModelProperty("机器id")
    private String machineId;
    @ApiModelProperty("机器id")
    private String orderSn;
    private String type;
    @ApiModelProperty("级别")
    private String level;
    @ApiModelProperty("事件码")
    private String eventCode;
    @ApiModelProperty("事件内容")
    private String eventMessage;
    @ApiModelProperty("消息json字符串")
    private String message;
    @ApiModelProperty("记录时间")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date recordTime;
    @ApiModelProperty("告警记录处理状态")
    private int status;
    @ApiModelProperty("线上/线下订单的区别字段")
    private  int oline;

    public int getOline() {
        return oline;
    }

    public void setOline(int oline) {
        this.oline = oline;
    }

    public MessageRecord() {
    }

    public MessageRecord(String machineId, String orderSn, MachineEvent machineEvent, String message) {
        this.machineId = machineId;
        this.orderSn = orderSn;
        this.level = machineEvent.getLevel();
        this.eventCode = machineEvent.getEventCode();
        this.eventMessage = machineEvent.getEventMessage();
        this.message = message;
        this.recordTime = new Date();
        this.status = 0;
    }

    public int getId() {
        return this.id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getMachineId() {
        return this.machineId;
    }

    public void setMachineId(String machineId) {
        this.machineId = machineId;
    }

    public String getOrderSn() {
        return this.orderSn;
    }

    public void setOrderSn(String orderSn) {
        this.orderSn = orderSn;
    }

    public String getType() {
        return this.type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getLevel() {
        return this.level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getEventCode() {
        return this.eventCode;
    }

    public void setEventCode(String eventCode) {
        this.eventCode = eventCode;
    }

    public String getEventMessage() {
        return this.eventMessage;
    }

    public void setEventMessage(String eventMessage) {
        this.eventMessage = eventMessage;
    }

    public String getMessage() {
        return this.message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Date getRecordTime() {
        return this.recordTime;
    }

    public void setRecordTime(Date recordTime) {
        this.recordTime = recordTime;
    }

    public int getStatus() {
        return this.status;
    }

    public void setStatus(int status) {
        this.status = status;
    }
}
